package hust.ning;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class addChatServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/plain");
		resp.setHeader("Cache-Control","no-cache");
		String uid= req.getParameter("sessionID");
		String content= req.getParameter("content");
		
		ChatApp.getInstance().addChat(uid, content);
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doGet(req, resp);		
	}
}
